package com.ansuenjob.model;

/**
 * BstPersonTrainId entity. @author MyEclipse Persistence Tools
 */

public class BstPersonTrainId implements java.io.Serializable {

	// Fields

	private Integer mid;
	private Integer perid;
	private String username;
	private Integer resid;
	private Short beginYear;
	private Short beginMonth;
	private Short endYear;
	private Short endMonth;
	private String trainName;
	private String trainPlace;
	private String lessonName;
	private String certName;
	private String trainDesc;
	private Short lang;
	private Short state;

	// Constructors

	/** default constructor */
	public BstPersonTrainId() {
	}

	/** minimal constructor */
	public BstPersonTrainId(Integer mid, Integer perid, String username,
			Integer resid) {
		this.mid = mid;
		this.perid = perid;
		this.username = username;
		this.resid = resid;
	}

	/** full constructor */
	public BstPersonTrainId(Integer mid, Integer perid, String username,
			Integer resid, Short beginYear, Short beginMonth, Short endYear,
			Short endMonth, String trainName, String trainPlace,
			String lessonName, String certName, String trainDesc, Short lang,
			Short state) {
		this.mid = mid;
		this.perid = perid;
		this.username = username;
		this.resid = resid;
		this.beginYear = beginYear;
		this.beginMonth = beginMonth;
		this.endYear = endYear;
		this.endMonth = endMonth;
		this.trainName = trainName;
		this.trainPlace = trainPlace;
		this.lessonName = lessonName;
		this.certName = certName;
		this.trainDesc = trainDesc;
		this.lang = lang;
		this.state = state;
	}

	// Property accessors

	public Integer getMid() {
		return this.mid;
	}

	public void setMid(Integer mid) {
		this.mid = mid;
	}

	public Integer getPerid() {
		return this.perid;
	}

	public void setPerid(Integer perid) {
		this.perid = perid;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Integer getResid() {
		return this.resid;
	}

	public void setResid(Integer resid) {
		this.resid = resid;
	}

	public Short getBeginYear() {
		return this.beginYear;
	}

	public void setBeginYear(Short beginYear) {
		this.beginYear = beginYear;
	}

	public Short getBeginMonth() {
		return this.beginMonth;
	}

	public void setBeginMonth(Short beginMonth) {
		this.beginMonth = beginMonth;
	}

	public Short getEndYear() {
		return this.endYear;
	}

	public void setEndYear(Short endYear) {
		this.endYear = endYear;
	}

	public Short getEndMonth() {
		return this.endMonth;
	}

	public void setEndMonth(Short endMonth) {
		this.endMonth = endMonth;
	}

	public String getTrainName() {
		return this.trainName;
	}

	public void setTrainName(String trainName) {
		this.trainName = trainName;
	}

	public String getTrainPlace() {
		return this.trainPlace;
	}

	public void setTrainPlace(String trainPlace) {
		this.trainPlace = trainPlace;
	}

	public String getLessonName() {
		return this.lessonName;
	}

	public void setLessonName(String lessonName) {
		this.lessonName = lessonName;
	}

	public String getCertName() {
		return this.certName;
	}

	public void setCertName(String certName) {
		this.certName = certName;
	}

	public String getTrainDesc() {
		return this.trainDesc;
	}

	public void setTrainDesc(String trainDesc) {
		this.trainDesc = trainDesc;
	}

	public Short getLang() {
		return this.lang;
	}

	public void setLang(Short lang) {
		this.lang = lang;
	}

	public Short getState() {
		return this.state;
	}

	public void setState(Short state) {
		this.state = state;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof BstPersonTrainId))
			return false;
		BstPersonTrainId castOther = (BstPersonTrainId) other;

		return ((this.getMid() == castOther.getMid()) || (this.getMid() != null
				&& castOther.getMid() != null && this.getMid().equals(
				castOther.getMid())))
				&& ((this.getPerid() == castOther.getPerid()) || (this
						.getPerid() != null && castOther.getPerid() != null && this
						.getPerid().equals(castOther.getPerid())))
				&& ((this.getUsername() == castOther.getUsername()) || (this
						.getUsername() != null
						&& castOther.getUsername() != null && this
						.getUsername().equals(castOther.getUsername())))
				&& ((this.getResid() == castOther.getResid()) || (this
						.getResid() != null && castOther.getResid() != null && this
						.getResid().equals(castOther.getResid())))
				&& ((this.getBeginYear() == castOther.getBeginYear()) || (this
						.getBeginYear() != null
						&& castOther.getBeginYear() != null && this
						.getBeginYear().equals(castOther.getBeginYear())))
				&& ((this.getBeginMonth() == castOther.getBeginMonth()) || (this
						.getBeginMonth() != null
						&& castOther.getBeginMonth() != null && this
						.getBeginMonth().equals(castOther.getBeginMonth())))
				&& ((this.getEndYear() == castOther.getEndYear()) || (this
						.getEndYear() != null && castOther.getEndYear() != null && this
						.getEndYear().equals(castOther.getEndYear())))
				&& ((this.getEndMonth() == castOther.getEndMonth()) || (this
						.getEndMonth() != null
						&& castOther.getEndMonth() != null && this
						.getEndMonth().equals(castOther.getEndMonth())))
				&& ((this.getTrainName() == castOther.getTrainName()) || (this
						.getTrainName() != null
						&& castOther.getTrainName() != null && this
						.getTrainName().equals(castOther.getTrainName())))
				&& ((this.getTrainPlace() == castOther.getTrainPlace()) || (this
						.getTrainPlace() != null
						&& castOther.getTrainPlace() != null && this
						.getTrainPlace().equals(castOther.getTrainPlace())))
				&& ((this.getLessonName() == castOther.getLessonName()) || (this
						.getLessonName() != null
						&& castOther.getLessonName() != null && this
						.getLessonName().equals(castOther.getLessonName())))
				&& ((this.getCertName() == castOther.getCertName()) || (this
						.getCertName() != null
						&& castOther.getCertName() != null && this
						.getCertName().equals(castOther.getCertName())))
				&& ((this.getTrainDesc() == castOther.getTrainDesc()) || (this
						.getTrainDesc() != null
						&& castOther.getTrainDesc() != null && this
						.getTrainDesc().equals(castOther.getTrainDesc())))
				&& ((this.getLang() == castOther.getLang()) || (this.getLang() != null
						&& castOther.getLang() != null && this.getLang()
						.equals(castOther.getLang())))
				&& ((this.getState() == castOther.getState()) || (this
						.getState() != null && castOther.getState() != null && this
						.getState().equals(castOther.getState())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMid() == null ? 0 : this.getMid().hashCode());
		result = 37 * result
				+ (getPerid() == null ? 0 : this.getPerid().hashCode());
		result = 37 * result
				+ (getUsername() == null ? 0 : this.getUsername().hashCode());
		result = 37 * result
				+ (getResid() == null ? 0 : this.getResid().hashCode());
		result = 37 * result
				+ (getBeginYear() == null ? 0 : this.getBeginYear().hashCode());
		result = 37
				* result
				+ (getBeginMonth() == null ? 0 : this.getBeginMonth()
						.hashCode());
		result = 37 * result
				+ (getEndYear() == null ? 0 : this.getEndYear().hashCode());
		result = 37 * result
				+ (getEndMonth() == null ? 0 : this.getEndMonth().hashCode());
		result = 37 * result
				+ (getTrainName() == null ? 0 : this.getTrainName().hashCode());
		result = 37
				* result
				+ (getTrainPlace() == null ? 0 : this.getTrainPlace()
						.hashCode());
		result = 37
				* result
				+ (getLessonName() == null ? 0 : this.getLessonName()
						.hashCode());
		result = 37 * result
				+ (getCertName() == null ? 0 : this.getCertName().hashCode());
		result = 37 * result
				+ (getTrainDesc() == null ? 0 : this.getTrainDesc().hashCode());
		result = 37 * result
				+ (getLang() == null ? 0 : this.getLang().hashCode());
		result = 37 * result
				+ (getState() == null ? 0 : this.getState().hashCode());
		return result;
	}

}